package com.wwtech.epp.view.dynamicapp;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;

import com.wwtech.epp.R;
import com.wwtech.epp.entity.DynamicUI;

/**
 * Created by hu on 2017/9/18.
 * 多行文本
 */

public class TextviewAppView extends LinearLayout{

    private EditText editText;
    private DynamicUI.DataBean dataBean;
    private String key;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public EditText getEditText() {
        return editText;
    }

    public void setEditText(EditText editText) {
        this.editText = editText;
    }

    public DynamicUI.DataBean getDataBean() {
        return dataBean;
    }

    public void setDataBean(DynamicUI.DataBean dataBean) {
        this.dataBean = dataBean;
        initContent();
    }

    public TextviewAppView(Context context) {
        super(context);
        init(context);
    }
    private void init(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.appview_textview, this, true);
        editText = (EditText) view.findViewById(R.id.editText);
    }

    private void initContent() {
        editText.setHint(dataBean.getPlacehold());
    }
}
